<?php

/**
* 分享文章的链接，必须将函数share()放在loop循环内
* 需要shortlink.php,the_thumb.php的支持
*/

function share(){
	$excerpt = function_exists('mb_strimwidth') ? mb_strimwidth(get_the_excerpt(),0,100,'...') : '';
	$url = get_shortlink();
	$click = 'window.open(\'http://service.weibo.com/share/share.php?url=\'+encodeURIComponent(\''.$url.'\')+\'&appkey=1361005514&title=《'.get_the_title().'》'.$excerpt.'&pic='.get_thumb_src().'&ralateUid=1630702633\');return false;';
	echo '<a href="#" onclick="'.$click.'">'.get_interpret('分享').'</a>';
}